object fCadFinanceiro: TfCadFinanceiro
  Left = 407
  Top = 206
  BorderStyle = bsDialog
  Caption = '-'
  ClientHeight = 346
  ClientWidth = 526
  Color = clBtnFace
  Font.Charset = DEFAULT_CHARSET
  Font.Color = clWindowText
  Font.Height = -11
  Font.Name = 'MS Sans Serif'
  Font.Style = []
  KeyPreview = True
  OldCreateOrder = False
  Position = poMainFormCenter
  OnKeyPress = FormKeyPress
  OnShow = FormShow
  PixelsPerInch = 96
  TextHeight = 13
  object GroupBox1: TGroupBox
    Left = 4
    Top = 0
    Width = 520
    Height = 103
    TabOrder = 0
    object Label1: TLabel
      Left = 134
      Top = 48
      Width = 23
      Height = 13
      Caption = 'Data'
    end
    object Label4: TLabel
      Left = 6
      Top = 48
      Width = 51
      Height = 13
      Caption = 'Valor Total'
    end
    object Label9: TLabel
      Left = 269
      Top = 56
      Width = 72
      Height = 13
      Caption = 'Lancar Parcela'
    end
    object Label10: TLabel
      Left = 269
      Top = 69
      Width = 34
      Height = 13
      Caption = 'manual'
    end
    object Label3: TLabel
      Left = 6
      Top = 8
      Width = 32
      Height = 13
      Caption = 'Cliente'
    end
    object SpeedButton5: TSpeedButton
      Left = 489
      Top = 21
      Width = 23
      Height = 25
      Flat = True
      Glyph.Data = {
        2E060000424D2E06000000000000360400002800000015000000150000000100
        080000000000F8010000120B0000120B0000000100005D00000000000000DFDF
        E800E9E90C008D8D8D0092924E00FFFF720070702A00BEBDBD00CECE14003737
        270062626900F4F41E001D1D1D00A8A81B00F6F6FB00FFFFE20099999900FFFF
        B9005A5A5200D9D929009C9C6200FFFFEE007C7B6900C5C5D40042423900FFFF
        0000FFFFAA00A5A59E00A9A93800D7D7130095959200FFFF3B00807F39000908
        0800F2F2F200D8D8D800FFFF990077775D00E1E14700949480004F4F4F00B4B4
        A400CCCCCC00BBBB22008B8A6900757575002A2A37009D9D4300F9F90900FFFF
        FF003D3B3B00FFFF8F009090AB00FFFF1C00F8F8F8008585490085859800CFCF
        D9000E0E0E00E4E4E400E0E0E000ABAB1E0033333300FFFF830064647E002929
        2700FFFFC6007A7A7A00D2D22200FFFF2D00C2C2C200A5A53F00AFAFAF00ECEC
        06009B9BA600DDDD2D00C8C81D00FCFC060000000500CECEDE0095955400FFFF
        2300A4A3A300F0F0F500E2E2EB0076763300D1D1150024232800A6A52300FFFF
        BD005D5C5C00D6D6E000F4F41000000000000000000000000000000000000000
        0000000000000000000000000000000000000000000000000000000000000000
        0000000000000000000000000000000000000000000000000000000000000000
        0000000000000000000000000000000000000000000000000000000000000000
        0000000000000000000000000000000000000000000000000000000000000000
        0000000000000000000000000000000000000000000000000000000000000000
        0000000000000000000000000000000000000000000000000000000000000000
        0000000000000000000000000000000000000000000000000000000000000000
        0000000000000000000000000000000000000000000000000000000000000000
        0000000000000000000000000000000000000000000000000000000000000000
        0000000000000000000000000000000000000000000000000000000000000000
        0000000000000000000000000000000000000000000000000000000000000000
        0000000000000000000000000000000000000000000000000000000000000000
        0000000000000000000000000000000000000000000000000000000000000000
        0000000000000000000000000000000000000000000000000000000000000000
        0000000000000000000000000000000000000000000000000000000000000000
        0000000000000000000000000000000000000000000000000000000000000000
        0000000000000000000000000000000000000000000000000000000000000000
        0000000000000000000000000000000000000000000000000000000000000000
        0000000000000000000000000000000000000000000000000000000000000000
        0000000000000000000000000000000000000000000000000000313131313131
        3131313131313131313131313131310000003131313131313131313131313131
        3131313131313100000031313131313131313131313131313131313123033100
        00003131313131313131313131313131313131073E2152000000313131313131
        3131313131313131313643210032520000003131313131313131313131313131
        2A3200002D223100000031313131310E530E3131313131103A000C4831313100
        00003131314627502F141B54313B5A0000283C31313131000000313103504B19
        194D08043841002103313131313131000000314A4759511919191930064E3E2A
        31313131313131000000012033051919191919195C1222313131313131313100
        0000402B4245191919191919192F0E313131313131313100000057130F351919
        19191919193D3931313131313131310000002E44153F19191919191919585B31
        31313131313131000000340D243135191919191919370E313131313131313100
        000036250B1A1F19191919194C4A31313131313131313100000031395549111F
        1919195616363131313131313131310000003131172C2926021D1C1E53313131
        313131313131310000003131310E1B18090A3931313131313131313131313100
        0000313131313131313131313131313131313131313131000000313131313131
        313131313131313131313131313131000000}
      OnClick = SpeedButton5Click
    end
    object Button1: TButton
      Left = 373
      Top = 52
      Width = 140
      Height = 40
      Caption = 'Adicionar'
      TabOrder = 4
      OnClick = Button1Click
    end
    object checkParcManual: TCheckBox
      Left = 249
      Top = 61
      Width = 14
      Height = 20
      Checked = True
      State = cbChecked
      TabOrder = 3
    end
    object Edit1: TEdit
      Left = 68
      Top = 24
      Width = 418
      Height = 21
      Enabled = False
      Font.Charset = DEFAULT_CHARSET
      Font.Color = clWindowText
      Font.Height = -11
      Font.Name = 'MS Sans Serif'
      Font.Style = [fsBold]
      ParentFont = False
      TabOrder = 1
    end
    object dbEntidade: TEdit
      Left = 8
      Top = 24
      Width = 57
      Height = 21
      TabOrder = 0
      OnExit = dbEntidadeExit
      OnKeyDown = dbEntidadeKeyDown
    end
    object DateEdit1: TDateEdit
      Left = 136
      Top = 64
      Width = 97
      Height = 21
      NumGlyphs = 2
      TabOrder = 2
      OnExit = DateEdit1Exit
    end
    object edValorTotal: TRxCalcEdit
      Left = 8
      Top = 64
      Width = 113
      Height = 21
      AutoSize = False
      DisplayFormat = '##,###,#0.00'
      Enabled = False
      NumGlyphs = 2
      TabOrder = 5
    end
  end
  object GroupBox2: TGroupBox
    Left = 4
    Top = 102
    Width = 520
    Height = 209
    Caption = 'Parcelas'
    TabOrder = 1
    object DBGrid1: TRxDBGrid
      Left = 2
      Top = 14
      Width = 516
      Height = 193
      DataSource = dsParcelas
      Options = [dgTitles, dgIndicator, dgColLines, dgRowLines, dgRowSelect, dgConfirmDelete, dgCancelOnExit]
      TabOrder = 0
      TitleFont.Charset = DEFAULT_CHARSET
      TitleFont.Color = clWindowText
      TitleFont.Height = -11
      TitleFont.Name = 'MS Sans Serif'
      TitleFont.Style = []
      OnDrawColumnCell = DBGrid1DrawColumnCell
      OnDblClick = DBGrid1DblClick
      Columns = <
        item
          Expanded = False
          FieldName = 'PARCELA'
          Title.Alignment = taCenter
          Title.Caption = 'Parcela'
          Width = 50
          Visible = True
        end
        item
          Alignment = taCenter
          Expanded = False
          FieldName = 'VENC_REC'
          Title.Alignment = taCenter
          Title.Caption = 'Vencimento'
          Width = 98
          Visible = True
        end
        item
          Expanded = False
          FieldName = 'VALOR_PARCELA'
          Title.Alignment = taRightJustify
          Title.Caption = 'Valor Parcela'
          Width = 120
          Visible = True
        end
        item
          Expanded = False
          FieldName = 'SITUACAO_1'
          Title.Caption = 'Situa'#231#227'o'
          Width = 98
          Visible = True
        end>
    end
  end
  object Button2: TButton
    Left = 5
    Top = 313
    Width = 75
    Height = 25
    Caption = 'Estornar'
    TabOrder = 2
    OnClick = Button2Click
  end
  object Button3: TButton
    Left = 85
    Top = 313
    Width = 75
    Height = 25
    Caption = 'Excluir'
    TabOrder = 3
    OnClick = Button3Click
  end
  object dsCliente: TDataSource
    Left = 164
    Top = 202
  end
  object dsParcelas: TDataSource
    DataSet = parcelaConsulta
    Left = 252
    Top = 210
  end
  object qryParcelaMax: TIBOQuery
    Params = <
      item
        DataType = ftInteger
        Name = 'P'
        ParamType = ptInput
      end>
    DatabaseName = 'C:\Delphi7\Integrado\Dados\BANCO.GDB'
    IB_Connection = dm.base
    RecordCountAccurate = True
    SQL.Strings = (
      'select max(financeiro_parcela.parcela) from financeiro_parcela'
      'where financeiro_parcela.cod_financeiro = :P')
    FieldOptions = []
    Left = 332
    Top = 186
    object qryParcelaMaxMAX: TIntegerField
      FieldName = 'MAX'
      ReadOnly = True
    end
  end
  object qryFinanceiroMax: TIBOQuery
    Params = <
      item
        DataType = ftInteger
        Name = 'P'
        ParamType = ptInput
      end>
    DatabaseName = 'C:\Delphi7\Integrado\Dados\BANCO.GDB'
    IB_Connection = dm.base
    RecordCountAccurate = True
    SQL.Strings = (
      'select max(financeiro_parcela.parcela) from financeiro_parcela'
      'where financeiro_parcela.cod_financeiro = :P')
    FieldOptions = []
    Left = 260
    Top = 162
    object IntegerField1: TIntegerField
      FieldName = 'MAX'
      ReadOnly = True
    end
  end
  object parcelaConsulta: TIBOQuery
    Params = <
      item
        DataType = ftUnknown
        Name = 'FINANCEIRO'
        ParamType = ptUnknown
      end>
    DatabaseName = 'C:\Delphi7\Integrado\Dados\BANCO.GDB'
    IB_Connection = dm.base
    RecordCountAccurate = True
    SQL.Strings = (
      'select financeiro.*,'
      'CASE WHEN financeiro.situacao = '#39'P'#39' THEN '#39'PENDENTE'#39
      '     WHEN financeiro.situacao = '#39'Q'#39' THEN '#39'QUITADO'#39
      'end as situacao'
      'from financeiro'
      'where financeiro.venda_fk = :FINANCEIRO'
      'order by financeiro.parcela')
    FieldOptions = []
    Left = 92
    Top = 170
    object parcelaConsultaCODIGO: TIntegerField
      FieldName = 'CODIGO'
      Required = True
    end
    object parcelaConsultaVENDA_FK: TIntegerField
      FieldName = 'VENDA_FK'
    end
    object parcelaConsultaCOMPRA_FK: TIntegerField
      FieldName = 'COMPRA_FK'
    end
    object parcelaConsultaCAIXA_FK: TIntegerField
      FieldName = 'CAIXA_FK'
    end
    object parcelaConsultaVALOR_PARCELA: TBCDField
      FieldName = 'VALOR_PARCELA'
      DisplayFormat = '##,###,#0.00'
      Size = 2
    end
    object parcelaConsultaSITUACAO: TStringField
      FieldName = 'SITUACAO'
      Size = 1
    end
    object parcelaConsultaNUMERO_DOC: TStringField
      FieldName = 'NUMERO_DOC'
    end
    object parcelaConsultaTIPO: TStringField
      FieldName = 'TIPO'
      Size = 1
    end
    object parcelaConsultaPARCELA: TIntegerField
      FieldName = 'PARCELA'
    end
    object parcelaConsultaSITUACAO_1: TStringField
      FieldName = 'SITUACAO_1'
      ReadOnly = True
      Size = 8
    end
    object parcelaConsultaVENC_REC: TDateField
      FieldName = 'VENC_REC'
    end
    object parcelaConsultaDEPENDENTE: TIntegerField
      FieldName = 'DEPENDENTE'
    end
  end
  object dsFornecedor: TDataSource
    Left = 172
    Top = 154
  end
  object GeraCodigoVenda: TIBOQuery
    Params = <>
    DatabaseName = 'C:\Delphi7\Integrado\Dados\BANCO.GDB'
    IB_Connection = dm.base
    RecordCountAccurate = True
    SQL.Strings = (
      'select GEN_ID(GEN_VENDA_ID,1) PK FROM RDB$DATABASE')
    FieldOptions = []
    Left = 208
    Top = 224
    object GeraCodigoVendaPK: TLargeintField
      FieldName = 'PK'
      ReadOnly = True
      Required = True
    end
  end
  object GeraCodigoCompra: TIBOQuery
    Params = <>
    DatabaseName = 'C:\Delphi7\Integrado\Dados\BANCO.GDB'
    IB_Connection = dm.base
    RecordCountAccurate = True
    SQL.Strings = (
      'select GEN_ID(GEN_COMPRA_ID,1) PK FROM RDB$DATABASE')
    FieldOptions = []
    Left = 288
    Top = 224
    object GeraCodigoCompraPK: TLargeintField
      FieldName = 'PK'
      ReadOnly = True
      Required = True
    end
  end
end
